import request from '@/utils/request'

// 查询二课成绩单列表
export function listCard(query) {
  return request({
    url: '/reportcard/card/list',
    method: 'get',
    params: query
  })
}

// 查询二课成绩单详细
export function getCard(id) {
  return request({
    url: '/reportcard/card/' + id,
    method: 'get'
  })
}
// 查询成绩单详细
export function getCardInfo(id) {
  return request({
    url: '/reportcard/card/pdf/' + id,
    method: 'get'
  })
}

// 新增二课成绩单
export function addCard(data) {
  return request({
    url: '/reportcard/card',
    method: 'post',
    data: data
  })
}

// 修改二课成绩单
export function updateCard(data) {
  return request({
    url: '/reportcard/card',
    method: 'put',
    data: data
  })
}

// 删除二课成绩单
export function delCard(id) {
  return request({
    url: '/reportcard/card/' + id,
    method: 'delete'
  })
}

// 查看
export function getCardInfos(data) {
  return request({
    url: '/reportcard/card/getGradeDetails',
    method: 'get',
    params:data
  })
}
// 团学组织详情查看
export function getOrgInfo(id) {
  return request({
    url: '/reportcard/card/getStudentOrg/' + id,
    method: 'get'
  })
}

// 社会实践详情查看
export function getSocInfo(id) {
  return request({
    url: '/reportcard/card/getEqxm/' + id,
    method: 'get'
  })
}

// 志愿活动详情查看
export function getVolInfo(id) {
  return request({
    url: '/reportcard/card/getVolunteer/' + id,
    method: 'get'
  })
}